package com.eclink.iot.tcpserver;

import com.eclink.iot.mqtt.MqttManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.socket.config.annotation.EnableWebSocket;

@EnableWebSocket
@SpringBootApplication
public class EclinkIotTcpServerApplication {

    public static void main(String[] args) {

        SpringApplication.run(EclinkIotTcpServerApplication.class, args);

        // 启动RFID服务器
        RFIDServerManager.startRFIDServer();

        // 连接MQTT服务器
        MqttManager.connect();

        System.out.println("  RFID服务启动成功  \n" +
                "  ______ _____ _      _____ _   _ _  __             _____  ______ _____ _____  \n" +
                " |  ____/ ____| |    |_   _| \\ | | |/ /            |  __ \\|  ____|_   _|  __ \\ \n" +
                " | |__ | |    | |      | | |  \\| | ' /             | |__) | |__    | | | |  | |\n" +
                " |  __|| |    | |      | | | . ` |  <              |  _  /|  __|   | | | |  | |\n" +
                " | |___| |____| |____ _| |_| |\\  | . \\             | | \\ \\| |     _| |_| |__| |\n" +
                " |______\\_____|______|_____|_| \\_|_|\\_\\            |_|  \\_\\_|    |_____|_____/ \n" +
                "                                                                               \n" +
                "                                                                              ");

    }

}
